<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>Document</title>
    <style>
     
    </style>

</head>
<body>
    <h1>后盾45留言系统</h1>
   
<?php
 $data=file_get_contents("mydb.rdb");
 $arr=explode("\n",$data);
 unset($arr[count($arr)-1]);
 
 foreach ($arr as $key) :
     $mymsg=explode("@##@", $key);
 ?>
 <table border="1" width="400">
     <tr>
         <?php $my_t=getdate(date($mymsg[3]));?>
         <td>有一个<?php echo $mymsg[0]==0?"美女":"帅哥";?>
         <?php echo $mymsg[2] ?>
             在<?php print("$my_t[weekday]")?>说：<?php echo $mymsg[4] ?><img src="<?php echo $mymsg[1]==0?'/1.gif':'/2.gif';?>"/>
         </td>
     </tr>
     <tr>
         <td><strong>
             详细内容：<?php echo $mymsg[5]?></strong>
         </td>
     </tr>
    
 </table>   
<?php
endforeach;
?>
<form action="add.php" method="post">
    <table border="1" width="400">
        <tr>
            <td >姓别</td>
            <td colspan="4"><input type="radio" name="sex" value="0" checked="checked"/>男
            <input type="radio" name="sex" value="1" />女
            </td>
        </tr>
        <tr>
            <td >心情</td>
            <td width="100"><img src="/1.gif"/></td><td ><input width="50" type="radio"  checked="checked" value="0" name="feel"/> </td>
            <td width="100" ><img  src="/2.gif"/></td><td><input width="50" type="radio"   value="1" name="feel"/> </td>
           
        </tr>
        <tr>
            <td>姓名</td>
            <td colspan="4">
                <input type="text" name="name"/>
            </td>
        </tr>
       
        <tr>
            <td>内容提要</td>
            <td colspan="4">
                <input type="text" name="title"/>
            </td>
        </tr>
        <tr>
            <td>详细内容</td>
            <td colspan="4"><textarea cols="40" rows="5" name="con"/></textarea></td>
        </tr>
        <tr>
          <td colspan="5"><input type="submit"/></td>
        </tr>

    </table>
</form>

</body>
</html>